import PropTypes from "prop-types"
import React, { memo } from "react"
import MuiPagination from '@mui/material/Pagination'
import { Button } from '@mui/material'
import { PaginationWrapper } from "./style";
const Pagination = memo((props) => {
  const { config, pageChangeHandle } = props 
  return (
    <PaginationWrapper>
      <MuiPagination count={config.totalPage} onChange={(e, page) => pageChangeHandle(page)}>

      </MuiPagination>
    </PaginationWrapper>
  )
});

Pagination.propTypes = {
  pageChangeHandle: PropTypes.func,
  config: PropTypes.object
}

export default Pagination
